<%--
    工程名：HebeuCS
    时间：16-11-4 下午9:07
    作者：白雨濃 evil
    邮箱：evilbai@foxmail.com
    内容：代码区主页
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--去除多余空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--h5声明--%>
<!DOCTYPE html>
<html>
<head>
    <title>代码讨论区</title>

    <%@include file="common/basehead.jsp" %>

    <%--返回顶部--%>
    <script src="${pageContext.request.contextPath}/static/js/zzsc.js"></script>
    <link href="${pageContext.request.contextPath}/static/css/zzsc.css" rel="stylesheet"/>

    <link href="${pageContext.request.contextPath}/static/css/code_index.css" rel="stylesheet"/>
    <link href="${pageContext.request.contextPath}/static/css/loading.css" rel="stylesheet"/>

</head>
<body>
<div id="main" class="main">
    <%@include file="common/navbar.jsp" %>
    <div class="top-ad">
        <img src="${pageContext.request.contextPath}/static/image/topad-1.jpg" alt="顶部图片">
    </div>

    <div class="content">
        <div class="user-info">
            <ul class="user-info-list">
                <c:choose>
                    <c:when test="${user.userImgPath!=null}">
                        <li>
                            <img id="head-img" class="img-circle user-info-head-img"
                                 src="${pageContext.request.contextPath}/static/image/headimg/${user.userImgPath}"
                                 alt="头像">
                            <hr>
                        </li>
                        <li>
                            <p style="color:#93999F;">账号:${user.userName}</p>
                            <p style="color:#93999F;">用户:${user.userRealName}</p>
                            <hr>
                        </li>
                    </c:when>
                </c:choose>
                <li>
                    <a class="btn btn-info" href="/code/release/newpost" target="_blank">我要发贴</a>
                    <hr>
                </li>
                <li>
                    <a class="btn btn-info" href="#">个人中心</a>
                    <hr>
                </li>
            </ul>
        </div>
        <div class="list">
            <div style="margin-top: 50px">
                <p style="color:#93999F;">类型:</p>
            </div>
            <div>
                <ul id="codetype-list" class="nav nav-tabs">
                    <c:forEach items="${codetypeList}" var="list">
                        <c:choose>
                            <c:when test="${list.codeTypeEntity.codeId==1}">
                                <li class="active">
                                    <a href="${list.codeTypeEntity.codeId}"
                                       data-toggle="tab">${list.codeTypeEntity.codeType}
                                        (${list.num})</a></li>
                            </c:when>
                            <c:otherwise>
                                <li>
                                    <a href="${list.codeTypeEntity.codeId}"
                                       data-toggle="tab">${list.codeTypeEntity.codeType} (${list.num})</a></li>
                            </c:otherwise>
                        </c:choose>
                    </c:forEach>
                </ul>
            </div>
            <div id="loading" class="loading">
                <div class="loader" style="margin: 10px">
                    <div class="loader-inner pacman">
                        <div></div>
                        <div></div>
                        <div></div>
                        <div></div>
                        <div></div>
                    </div>
                </div>
                <span><b>&nbsp;&nbsp;加载中......</b></span>
            </div>

            <div id="list">

            </div>
        </div>
    </div>
    <%@include file="common/basebottom.jsp" %>
</div>
<div style="display: none;" id="rocket-to-top">
    <div style="opacity:0;display: block;" class="level-2"></div>
    <div class="level-3"></div>
</div>
</body>
<script src="http://apps.bdimg.com/libs/jquery.cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="${pageContext.request.contextPath}/static/js/code_index.js"></script>
<script>
    $(function ()
    {
        code.init_cookies();
        code.select_type();
        code.select_tag();
    });
</script>
</html>
